#ifndef _REPL_H
#define	_REPL_H
#include "Image.h"
#include "Parser.h"
class Repl {
public:
    Repl(Image*);
    void run();
    void run(istream& stream);
    static void prepareImage(Image* image);
    ~Repl();
private:
    istream* stream;
    void statement(istream& inputStream,map<string,Object*>* temps);
    istream* askLine(string prompt);
    void handleRequest(Object* req);
    void addMethod(Object* cont,istream& stream);
    Parser* parser;
    Class* replClass;
    Class* classRequest;
    Class* debugRequest;
    Class* methodRequest;
    Image* image;
};

#endif	/* _REPL_H */

